package com.groovy.base.oop

class Student {
    private int StudentID;
    private String StudentName;

    int getStudentID() {
        return StudentID
    }

    void setStudentID(int studentID) {
        StudentID = studentID
    }

    String getStudentName() {
        return StudentName
    }

    void setStudentName(String studentName) {
        StudentName = studentName
    }

    static void main(String[] args) {
        Student st = new Student();
        st.StudentID = 1;
        st.StudentName = "Joe"

        println(st)
    }

    @Override
    public String toString() {
        return "Student{" +
                "StudentID=" + StudentID +
                ", StudentName='" + StudentName + '\'' +
                '}';
    }
}
